home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-07-28 | 7.3 KB | 287 lines | [TEXT/KAHL] |
- /*
- File: SampleSMSAMServer.r
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #define SystemSevenOrLater 1
- #define debug true
-
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __SYSTYPES.R__
- #include "SysTypes.r"
- #endif
-
- /***********************************|****************************************/
-
- #include "BovineConstants.h"
-
- #define AllItems 0b1111111111111111111111111111111 /* 31 flags */
- #define NoItems 0b0000000000000000000000000000000
- #define MenuItem1 0b0000000000000000000000000000001
- #define MenuItem2 0b0000000000000000000000000000010
- #define MenuItem3 0b0000000000000000000000000000100
- #define MenuItem4 0b0000000000000000000000000001000
- #define MenuItem5 0b0000000000000000000000000010000
- #define MenuItem6 0b0000000000000000000000000100000
- #define MenuItem7 0b0000000000000000000000001000000
- #define MenuItem8 0b0000000000000000000000010000000
- #define MenuItem9 0b0000000000000000000000100000000
- #define MenuItem10 0b0000000000000000000001000000000
- #define MenuItem11 0b0000000000000000000010000000000
- #define MenuItem12 0b0000000000000000000100000000000
-
- /***********************************|****************************************/
-
- /* we use an MBAR resource to conveniently load all the menus */
-
- #if debug
- resource 'MBAR' (kMenuBar, preload) {
- {
- kAppleMenu,
- kFileMenu,
- kEditMenu,
- kControlMenu,
- kGatewayMenu,
- kConfigMenu,
- kKeithMenu,
- kSteveMenu,
- kChrisMenu,
- kAddressesMenu
- };
- };
- #else
- resource 'MBAR' (kMenuBar, preload) {
- {
- kAppleMenu,
- kFileMenu,
- kEditMenu,
- kControlMenu
- };
- };
- #endif
-
- /***********************************|****************************************/
-
- resource 'MENU' (kAppleMenu, preload) {
- kAppleMenu, textMenuProc,
- AllItems & ~MenuItem2, /* Disable dashed line, enable About and DAs */
- enabled, apple,
- {
- "About BovineLeague…", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain
- }
- };
-
- /***********************************|****************************************/
-
- resource 'MENU' (kFileMenu, preload) {
- kFileMenu, textMenuProc,
- AllItems & ~MenuItem1 & ~MenuItem2 & ~MenuItem3 &
- ~MenuItem5 & ~MenuItem6 & ~MenuItem7 & ~MenuItem12,
- enabled, "File",
- {
- "New", noIcon, nokey, nomark, plain;
- "Open", noIcon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Close", noIcon, "W", nomark, plain;
- "Save", noIcon, "S", nomark, plain;
- "Save as…", noIcon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
-
- "Show main window", noIcon, nokey, nomark, plain;
- "Show log window", noIcon, nokey, nomark, plain;
- "Show To: Applelink letter log", noicon, nokey, nomark, plain;
- "Show To: AOCE Letter log", noicon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
-
- "Quit", noicon, "Q", nomark, plain
- }
- };
-
- /***********************************|****************************************/
-
- resource 'MENU' (kEditMenu, preload) {
- kEditMenu, textMenuProc,
- AllItems & ~MenuItem2, /* Disable dashed line, enable About and DAs */
- enabled, "Edit",
- {
- "Undo", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Cut", noicon, nokey, nomark, plain;
- "Copy", noicon, nokey, nomark, plain;
- "Paste", noicon, nokey, nomark, plain;
- "Clear", noicon, nokey, nomark, plain;
- }
- };
-
- /***********************************|****************************************/
-
- #if debug
-
- resource 'MENU' (kControlMenu, preload)
- {
- kControlMenu, textMenuProc,
- AllItems & ~MenuItem3 & ~MenuItem5 & ~MenuItem8,
- enabled, "Control",
- {
- "Pause gateway", noicon, "P", nomark, plain;
- "Step gateway", noicon, "S", nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Show threads window", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Show Memory Info", noicon, nokey, nomark, plain;
- "Show Memory Info Often", noicon, nokey, nomark, plain;
- "-", noicon, nokey, nomark, plain;
- "Force quit", noicon, nokey, nomark, plain;
- }
- };
-
- #else
-
- resource 'MENU' (kControlMenu, preload)
- {
- kControlMenu, textMenuProc,
- AllItems & ~MenuItem3,
- enabled, "Control",
- {
- "Pause gateway", noicon, nokey, nomark, plain;
- "Hover gateway", noicon, nokey, nomark, plain;
- "-", noIcon, nokey, nomark, plain;
- "Force quit", noicon, nokey, nomark, plain;
- }
- };
-
- #endif
-
- /***********************************|****************************************/
-
- resource 'vers' (1) {
- 0x1,
- 0x0,
- 0x20,
- 0,
- verUS,
- "1.0d1",
- "1.0d1 ©1991-94 Apple Computer, Inc."
- };
-
- /***********************************|****************************************/
-
- resource 'BNDL' (128) {
- 'BLoJ',
- 0,
- { 'FREF', { 0, 128 },
- 'ICN#', { 0, 128 }
- }
- };
-
- resource 'FREF' (128) {
- 'APPL',0,""
- };
-
-
- data 'BLoJ' (128) {
- $"0000"
- };
-
- /***********************************|****************************************/
-
- #define cAppleEventReply 40 // General command number used to process
- // asynchronous replies
- #define cFinderNew 41 // <!> The user selected the tool icon in the
- // Finder and chose "Open"
- #define cFinderPrint 42 // <!> The user selected document icons in
- // the Finder and chose "Print"
- #define cFinderOpen 43 // <!> The user selected document icons in
- // the Finder and chose "Open"
- #define cFinderQuit 44 // The user chose "Shutdown" or "Restart"
- // the Finder sends a 'quit' AppleEvent
-
- #define kAEDispatchTable 400
- #define kAdditionalAEDispatchTable 500
-
- type 'aedt' {
- wide array {
- unsigned longint type; /* Event class */
- unsigned longint creator; /* Event ID */
- unsigned longint commandNumber; /* Value */
- };
- };
-
- resource 'aedt' (kAEDispatchTable) {{ // Minimum for AppleEvent aware application
- 'aevt', 'ansr', cAppleEventReply;
- 'aevt', 'oapp', cFinderNew;
- 'aevt', 'odoc', cFinderOpen;
- 'aevt', 'pdoc', cFinderPrint;
- 'aevt', 'quit', cFinderQuit;
- }
- };
-
- #define cStatusLogInit 99
- #define cItemsToBeMonitored 100
- #define cStopMonitoring 101
- #define cStatusSessionAlive 102
- #define cMonitorCommand 103
- #define cSetConfigCommand 104
- #define cGetConfigCommand 105
-
- resource 'aedt' (kAdditionalAEDispatchTable) {{
- 'stmn','log ', cStatusLogInit;
- 'stmn','itms', cItemsToBeMonitored;
- 'stmn','stop', cStopMonitoring;
- 'stmn','alve', cStatusSessionAlive;
- 'stmn','butt', cMonitorCommand;
- 'stmn','sfig', cSetConfigCommand;
- 'stmn','gfig', cGetConfigCommand;
-
- }
- };
-
- /***********************************|****************************************/
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- acceptSuspendResumeEvents,
- enableOptionSwitch,
- canBackground,
-
- doesActivateOnFGSwitch, /* this says we do our own activate/deactivate; don't fake us out */
- backgroundAndForeground,
- dontGetFrontClicks,
- ignoreAppDiedEvents,
- is32BitCompatible,
-
- isHighLevelEventAware,
- localAndRemoteHLEvents,
- notStationeryAware,
- reserved,
- reserved,
- reserved,
- reserved,
- 2000*1024, 1024*1024
- };
-
- /***********************************|****************************************/
-
- // Include all of the appropriate icon suite resources
- #define ICONID 128
- #ifndef THINK_Rez
- include $$SHELL("BLJBovineServer")"SampleSMSAM Icons.rsrc" 'ICN#' (128) as 'ICN#' (ICONID);
- include $$SHELL("BLJBovineServer")"SampleSMSAM.rsrc" 'ICN#' (128) as 'ICN#' (ICONID);
- #else
- include "BovineServerIcons.rsrc" 'ICN#' (128) as 'ICN#' (ICONID);
- #endif
-
- /***********************************|****************************************/
-